package com.foreknow.oppExer1.exer10;

/**
 * @author shkstart
 * @create 2021-07-28 15:30
 */
public class HourlyEmployee extends Employee {
    private double wage;//每小时工资
    private int hour; //工作几小时
    private double birsalary=0;


    public void setBirsalary(double birsalary) {
        this.birsalary = birsalary;
    }
    @Override
    public double earnings() {
        return wage*hour+birsalary;
    }

    public HourlyEmployee() {
    }

    public HourlyEmployee(String name, String number, MyDate birthday, double wage, int hour) {
        super(name, number, birthday);
        this.wage = wage;
        this.hour = hour;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
